package com.liushuai.eas.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liushuai.eas.pojo.Classes;
import com.liushuai.eas.pojo.Student;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface StudentMapper extends BaseMapper<Student> {

    //查询所有
    List<Student> queryStudentList(int pageBegin, int pageEnd);

    //查询所有通过关键字
    List<Student> queryStudentListBySearch(int pageBegin,int pageEnd,String search);

    //查询总数
    int queryTotal();

    //查询总数通过关键字
    int queryTotalBySearch(String search);

    //查询男生人数
    int queryBoysNum();

    //查询男生人数
    int queryGirlNum();

    //查询各专业人数
    List<Map<Object,Object>> queryMajorStudentNum();

    //通过ID查询
    Student queryStudentById(int id);

    //查询一个班级的学生
    List<Map<String,Object>> queryStudentListByClass(int classId);

}
